package com.uni.db;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import com.uni.domain.Identifiable;

public interface GenericDao {

    public Session getSession();

    public Object get(Serializable id);

    public Identifiable merge(Identifiable entity);

    public void save(Identifiable entity);

    public void delete(Identifiable entity);

    public List listAll();

    public int countAll();

    public int getMaxFieldVaue(String fieldName);

    public void evict(Identifiable obj);

    public void flushSession();

    public void clearSession();

    public void setEntityClass(Class entityClass);

    public void setSessionFactory(SessionFactory sessionFactory);

    public SessionFactory getSessionFactory();

}
